package com.SunSoft.PhoneRemoteControl;

import android.app.AlertDialog.Builder;
import android.content.res.Resources;
import android.text.Editable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

final class eh
  implements View.OnLongClickListener
{
  public final boolean onLongClick(View paramView)
  {
    EditText localEditText1;
    EditText localEditText3;
    LinearLayout localLinearLayout1;
    LinearLayout localLinearLayout2;
    TextView localTextView;
    paramView = this.a.getResources().getResourceName(paramView.getId());
    int i = Integer.parseInt(paramView.substring(paramView.length() - 3));
    Show_Control.a("Test", "onLongClick" + i);
    this.a.g = i;
    if (((MainControl.d) && (Show_Control.l(this.a) == 1)) || ((MainControl.f) && (Show_Control.l(this.a) > 1) && (this.a.u == 2)))
    {
      paramView = this.a;
      View localView = LayoutInflater.from(paramView).inflate(2130903043, null);
      localEditText1 = (EditText)localView.findViewById(2131165228);
      EditText localEditText2 = (EditText)localView.findViewById(2131165230);
      localEditText3 = (EditText)localView.findViewById(2131165389);
      localLinearLayout1 = (LinearLayout)localView.findViewById(2131165388);
      localLinearLayout2 = (LinearLayout)localView.findViewById(2131165387);
      localTextView = (TextView)localView.findViewById(2131165245);
      Button localButton1 = (Button)localView.findViewById(2131165395);
      Button localButton2 = (Button)localView.findViewById(2131165397);
      Button localButton3 = (Button)localView.findViewById(2131165393);
      Button localButton4 = (Button)localView.findViewById(2131165391);
      Button localButton5 = (Button)localView.findViewById(2131165392);
      Button localButton6 = (Button)localView.findViewById(2131165396);
      paramView.aE = localTextView;
      paramView.aF = localEditText2;
      AlertDialog.Builder localBuilder = new AlertDialog.Builder(paramView);
      if (!(MainControl.d))
      {
        if (!(paramView.B))
          break label591;
        localLinearLayout2.setVisibility(0);
        localLinearLayout1.setVisibility(8);
        if (!(MainControl.e))
          localEditText2.setVisibility(8);
      }
      if (paramView.Q[paramView.g].length() == 0)
      {
        localTextView.setText(paramView.getString(2131099896));
        localEditText2.setText(paramView.Q[paramView.g]);
        if (paramView.B)
          localEditText1.setHint(paramView.T[paramView.g] + "," + paramView.getString(2131099893));
        localEditText2.setText(Show_Control.a(localEditText2.getText().toString(), 0));
        if (paramView.ae.equals(""))
          break label649;
        localEditText1.setText(paramView.ae);
        if (paramView.af.equals(""))
          break label666;
        localEditText3.setText(paramView.af);
        localBuilder.setTitle(2131099753);
        localBuilder.setIcon(17301659);
        localBuilder.setView(localView);
        localButton1.setOnClickListener(new dw(paramView, localEditText1, localEditText3));
        localButton2.setOnClickListener(new dx(paramView, localEditText2, localTextView, localEditText1, localEditText3));
        localButton3.setOnClickListener(new dy(paramView));
        localButton4.setOnClickListener(new ea(paramView, localEditText2));
        localButton5.setOnClickListener(new eb(paramView, localEditText2, localTextView));
        localButton6.setOnClickListener(new ec(paramView));
        paramView.j = localBuilder.show();
      }
    }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              return true;
              label591: localLinearLayout1.setVisibility(0);
              localLinearLayout2.setVisibility(8);
            }
            localTextView.setText(paramView.getString(2131099897) + paramView.Q[paramView.g].length());
          }
          label649: localEditText1.setText(paramView.R[paramView.g]);
        }
        label666: localEditText3.setText(paramView.S[paramView.g]);
      }
      this.a.M = true;
    }
  }
}